#ifndef CMODELMATRIX3D_H_
#define CMODELMATRIX3D_H_

#include "cmatrixbase.h"
#include "cvector3d.h"

/**
 * CModelMatrix3D - class representing 4x4 (3D space) modelview matrix
 * @author Michal Rost
 * @date 29.07.2007
 */
template <typename T>
class CModelMatrix3D : public CMatrixBase<T> {
public:
  CModelMatrix3D();
  CModelMatrix3D(T items[]);
  CModelMatrix3D(const CModelMatrix3D<T> &m);
  CModelMatrix3D(const CMatrixBase<T> &m);
  ~CModelMatrix3D();
  CModelMatrix3D<T>& operator = (const CModelMatrix3D<T> &m);
  CModelMatrix3D<T> operator + (const CModelMatrix3D<T> &m) const;
  CModelMatrix3D<T> operator - (const CModelMatrix3D<T> &m) const;
  CModelMatrix3D<T> operator * (const CModelMatrix3D<T> &m) const;
  CModelMatrix3D<T> operator * (T num) const;
  CModelMatrix3D<T> operator / (T num) const;
  TIndex getNumOfRows() const;
  TIndex getNumOfCols() const;
  void translate(T x, T y, T z);
  void translate(const CVector3D<T> &v);
  void rescale(T x, T y, T z);
  void rescale(const CVector3D<T> &v);
  void rotate(T angle, T x, T y, T z);
  static CVector3D<T> mul(const CModelMatrix3D<T> &m, const CVector3D<T> &v);
  static CVector3D<T> mul(const CVector3D<T> &v, const CModelMatrix3D<T> &m);
  static string getClassName() {
    return "CModelMatrix3D";
  }
protected:
  void setNumOfRows(TIndex numOfRows) {}
  void setNumOfCols(TIndex numOfCols) {}
};

#endif
